home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
util
/
boot
/
getpassword.lha
/
getpassword.Amos
/
getpassword.amosSourceCode
Wrap
AMOS Source Code
|
1999-01-27
|
3KB
|
162 lines
' Getpassword original program by THY
' Anyone can fully modify/enhance this program, no copyright, no charge
' or credit is asked.
'
Break Off
Hide
Get Rom Fonts
'
' Two screens for double-buffering
'
Screen Open 1,320,250,2,0
Curs Off
Palette 0,$F0,$70
Cls
Screen Open 0,320,250,2,0
Curs Off
Palette 0,$F0,$70
Paper 0 : Pen 1
Cls
'
' Read "?" coordinates, then precalc rotation
'
Degree
Dim X(18),Y(18),Z(18)
Dim XA(18,36),YA(18,36)
For I=1 To 18
Read X,Y
Z(I)=0
X(I)=X
Y(I)=-Y
Next
For J=1 To 36
A=J*10
For I=1 To 18
XA(I,J)=160+X(I)*Sin(A)
YA(I,J)=100+Y(I)
Next
Next
Set Font 1
'
' Checks for a password and load it in CDE$ (code)
'
CDE$=""
If Exist("Sys:prefs/getpassword")
Open In 1,"Sys:Prefs/getpassword"
L=Min(Lof(1),255)
X$=Input$(1,L)
I=1
While Mid$(X$,I,1)>=" "
CDE$=CDE$+Mid$(X$,I,1)
Inc I
Wend
Close 1
End If
TST$=Chr$(1)
'
' Loops while password is incorrect
'
A$=""
While TST$<>CDE$
Gosub HANKEY
Screen Copy 1,0,0,320,250 To 0,0,0
I$=Inkey$
If I$<>""
If I$<>Chr$(13)
A$=A$+I$
Else
TST$=A$
If TST$<>CDE$
For CLI=1 To 10
T=Timer
While Timer-T<15
Gosub HANKEY
Text 70,150," Access denied"
Screen Copy 1,0,0,320,250 To 0,0,0
Wend
T=Timer
While Timer-T<15
Gosub HANKEY
Screen Copy 1,0,0,320,250 To 0,0,0
Wend
Next
End If
A$=""
End If
End If
Wend
T=Timer
While Timer-T<50
Gosub HANKEY
Text 70,150," ACCESS GRANTED"
Screen Copy 1,0,0,320,250 To 0,0,0
Wend
T=Timer
Screen 0
Fade 3
While Timer-T<50
Gosub HANKEY
Text 70,150," ACCESS GRANTED"
Screen Copy 1,0,0,320,250 To 0,0,0
Wend
End
'
' Displays the "?"
'
' Why that stupid subroutine name ?
' Because I was looking a Southpark cartoon while coding this !
'
'
'''''''
HANKEY:
'''''''
Add J,1,1 To 36
Screen 1
Cls 0
Text 70,100,"Please Enter Access Code"
Plot XA(1,J),YA(1,J)
For I=2 To 14
Draw To XA(I,J),YA(I,J)
Next
Draw To XA(1,J),YA(1,J)
Plot XA(15,J),YA(15,J)
For I=16 To 18
Draw To XA(I,J),YA(I,J)
Next
Draw To XA(15,J),YA(15,J)
Multi Wait
'
' Amos has been sent to back ? Come back to front please !
'
If Not Amos Here
Amos To Front
End If
Multi Wait
Return
'
' Two vector objects...
'
'
' "?" coordinates
'
Data -50,40
Data -50,60
Data -30,80
Data 30,80
Data 50,60
Data 50,20
Data 10,-20
Data 10,-60
Data -10,-60
Data -10,-20
Data 30,20
Data 30,60
Data -30,60
Data -30,40
'
' "." coords
'
Data -10,-100
Data -10,-80
Data 10,-80
Data 10,-100